# coding: utf-8

"""
    Firefly III API Client

    This is the Python client for Firefly III API  # noqa: E501

    The version of the OpenAPI document: 0.10.0
    Contact: thegrumpydictator@gmail.com
    Generated by: https://openapi-generator.tech
"""


import pprint
import re  # noqa: F401

import six


class CurrencyUpdate(object):
    """NOTE: This class is auto generated by OpenAPI Generator.
    Ref: https://openapi-generator.tech

    Do not edit the class manually.
    """

    """
    Attributes:
      openapi_types (dict): The key is attribute name
                            and the value is attribute type.
      attribute_map (dict): The key is attribute name
                            and the value is json key in definition.
    """
    openapi_types = {
        'code': 'str',
        'decimal_places': 'str',
        'default': 'bool',
        'enabled': 'bool',
        'name': 'str',
        'symbol': 'str'
    }

    attribute_map = {
        'code': 'code',
        'decimal_places': 'decimal_places',
        'default': 'default',
        'enabled': 'enabled',
        'name': 'name',
        'symbol': 'symbol'
    }

    def __init__(self, code=None, decimal_places=None, default=None, enabled=None, name=None, symbol=None):  # noqa: E501
        """CurrencyUpdate - a model defined in OpenAPI"""  # noqa: E501

        self._code = None
        self._decimal_places = None
        self._default = None
        self._enabled = None
        self._name = None
        self._symbol = None
        self.discriminator = None

        self.code = code
        if decimal_places is not None:
            self.decimal_places = decimal_places
        if default is not None:
            self.default = default
        if enabled is not None:
            self.enabled = enabled
        self.name = name
        self.symbol = symbol

    @property
    def code(self):
        """Gets the code of this CurrencyUpdate.  # noqa: E501


        :return: The code of this CurrencyUpdate.  # noqa: E501
        :rtype: str
        """
        return self._code

    @code.setter
    def code(self, code):
        """Sets the code of this CurrencyUpdate.


        :param code: The code of this CurrencyUpdate.  # noqa: E501
        :type: str
        """
        if code is None:
            raise ValueError("Invalid value for `code`, must not be `None`")  # noqa: E501

        self._code = code

    @property
    def decimal_places(self):
        """Gets the decimal_places of this CurrencyUpdate.  # noqa: E501

        Supports 0-16 decimals.  # noqa: E501

        :return: The decimal_places of this CurrencyUpdate.  # noqa: E501
        :rtype: str
        """
        return self._decimal_places

    @decimal_places.setter
    def decimal_places(self, decimal_places):
        """Sets the decimal_places of this CurrencyUpdate.

        Supports 0-16 decimals.  # noqa: E501

        :param decimal_places: The decimal_places of this CurrencyUpdate.  # noqa: E501
        :type: str
        """

        self._decimal_places = decimal_places

    @property
    def default(self):
        """Gets the default of this CurrencyUpdate.  # noqa: E501

        Make this currency the default currency.  # noqa: E501

        :return: The default of this CurrencyUpdate.  # noqa: E501
        :rtype: bool
        """
        return self._default

    @default.setter
    def default(self, default):
        """Sets the default of this CurrencyUpdate.

        Make this currency the default currency.  # noqa: E501

        :param default: The default of this CurrencyUpdate.  # noqa: E501
        :type: bool
        """

        self._default = default

    @property
    def enabled(self):
        """Gets the enabled of this CurrencyUpdate.  # noqa: E501

        defaults to true  # noqa: E501

        :return: The enabled of this CurrencyUpdate.  # noqa: E501
        :rtype: bool
        """
        return self._enabled

    @enabled.setter
    def enabled(self, enabled):
        """Sets the enabled of this CurrencyUpdate.

        defaults to true  # noqa: E501

        :param enabled: The enabled of this CurrencyUpdate.  # noqa: E501
        :type: bool
        """

        self._enabled = enabled

    @property
    def name(self):
        """Gets the name of this CurrencyUpdate.  # noqa: E501


        :return: The name of this CurrencyUpdate.  # noqa: E501
        :rtype: str
        """
        return self._name

    @name.setter
    def name(self, name):
        """Sets the name of this CurrencyUpdate.


        :param name: The name of this CurrencyUpdate.  # noqa: E501
        :type: str
        """
        if name is None:
            raise ValueError("Invalid value for `name`, must not be `None`")  # noqa: E501

        self._name = name

    @property
    def symbol(self):
        """Gets the symbol of this CurrencyUpdate.  # noqa: E501


        :return: The symbol of this CurrencyUpdate.  # noqa: E501
        :rtype: str
        """
        return self._symbol

    @symbol.setter
    def symbol(self, symbol):
        """Sets the symbol of this CurrencyUpdate.


        :param symbol: The symbol of this CurrencyUpdate.  # noqa: E501
        :type: str
        """
        if symbol is None:
            raise ValueError("Invalid value for `symbol`, must not be `None`")  # noqa: E501

        self._symbol = symbol

    def to_dict(self):
        """Returns the model properties as a dict"""
        result = {}

        for attr, _ in six.iteritems(self.openapi_types):
            value = getattr(self, attr)
            if isinstance(value, list):
                result[attr] = list(map(
                    lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
                    value
                ))
            elif hasattr(value, "to_dict"):
                result[attr] = value.to_dict()
            elif isinstance(value, dict):
                result[attr] = dict(map(
                    lambda item: (item[0], item[1].to_dict())
                    if hasattr(item[1], "to_dict") else item,
                    value.items()
                ))
            else:
                result[attr] = value

        return result

    def to_str(self):
        """Returns the string representation of the model"""
        return pprint.pformat(self.to_dict())

    def __repr__(self):
        """For `print` and `pprint`"""
        return self.to_str()

    def __eq__(self, other):
        """Returns true if both objects are equal"""
        if not isinstance(other, CurrencyUpdate):
            return False

        return self.__dict__ == other.__dict__

    def __ne__(self, other):
        """Returns true if both objects are not equal"""
        return not self == other
